import React, { Suspense } from 'react'
import PrivateRoute from './privateRoute'
import { Spin } from 'antd';
export default function wrapperRouteComponent({title,auth,...props}) {
    title?document.title = title:''
  return (
    <Suspense fallback={<div><Spin /></div>}>
          {auth?<PrivateRoute {...props}></PrivateRoute>:props.element}
    </Suspense>
  )
}
